package com.itunic.cloud.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

/**
 * 开放user info端点，
 * 根据当前token获取用户信息
 * @author Sean
 */
@RestController
public class AuthController {
    @GetMapping("/user")
    public Principal user(Principal user){
        return user;
    }
}